Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA-397084: SR scan tries to deactivate LV in use by tapdisk #712

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

MarkSymsCtx
Copy link
Contributor

Back when this code was written we didn't have leaf coalesce doing snapshot coalesace operations, and so for performance reasons the scan code didn't reference count LVs that it activated on the assuption that nothing else would be in a position to start using the LV in the meantime. This assumption is no longer valid and induces scan failures when a new VDI is detected and the scan tries to deactivate it whilst it is open and in use by tapdisk. Move the scan code to use the lvactivator so that reference counts will be taken and honoured. Additionally, it's possible that more than one VDI might appear so don't treat this as a singular event and track all VDIs that might have been activated and dereference them at the end.

Back when this code was written we didn't have leaf coalesce doing
snapshot coalesace operations, and so for performance reasons the scan
code didn't reference count LVs that it activated on the assuption
that nothing else would be in a position to start using the LV in the
meantime. This assumption is no longer valid and induces scan failures
when a new VDI is detected and the scan tries to deactivate it whilst
it is open and in use by tapdisk. Move the scan code to use the
lvactivator so that reference counts will be taken and
honoured. Additionally, it's possible that more than one VDI might
appear so don't treat this as a singular event and track all VDIs that
might have been activated and dereference them at the end.

Signed-off-by: Mark Syms <[email protected]>
@MarkSymsCtx MarkSymsCtx merged commit d138bd1 into xapi-project:master Oct 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants